Script files consist of a series of lines, each of which contains a command word and zero or more arguments. The list of commands below shows which arguments are required for each command:
{ alternate # commands . . . alternate # commands
The order of command execution within a ``select block'' follows some special rules. Control begins with the first command in the first ``alternate block''. If that ``alternate block'' terminates successfully, then control jumps to the command following the ``select block''. If any recv command in the ``alternate block'' times out, then control passes to the next ``alternate block'' in sequence. Successive ``alternate blocks'' are executed until one completes successfully (i.e. no timeouts). If no more ``alternate blocks'' are available, processing terminates with a FATAL error. For example, the following script excerpt uses a ``select block'' to send a ``break'' if no ``login'' prompt appears within 30 seconds:
xmit "\r\r" { alternate recv "login" 30 alternate xmit "\#" recv "login" 30 } xmit "accountname\r"
speed|<type>phone-number
The speed parameter is the baud rate at which the connection should be made (from the set: 50, 75, 110, 134.5, 150, 200, 300, 600, 1200, 1800, 2400, 4800, 9600). The baud rate is separated from the rest of the phone-number-spec by a vertical bar, `|'.
The optional <type> specifies the line-type to use. If <type> is omitted, it defaults to ``LOCAL''. Note that the angle-brackets are part of the syntax and must surround the type to separate it from the rest of the phone-number-spec.
A phone-number is composed of a series of digits, in addition to the characters `(', `)', `-', and `:'. Parentheses and dashes are ignored, and may be used freely to enhance readability. The colon indicates that the dialer should await a secondary dial tone before proceeding with the dialing. This is used with phone systems that use preliminary digits to access outgoing lines, tie lines, etc.
If the phone-number-spec begins with a letter, it is taken to be the name of a direct connect line. The names and speeds of these lines are predefined. See the "Installing and Operating MMDFII" document for information about defining these lines.
Up to five phone-number-spec's can be given on a single dial command. If a connection cannot be made using the first number, succeeding phone-number-spec's will be tried in the order given before a failure is indicated. For example, the following command:
dial 1200|738-2928, 300|738-8003
would initiate a call to the first number (738-2928) at 1200 baud. If the connection failed, it would try the second number (738-8003) at 300 baud.
The dial command also clears the input buffer to prevent rewinding by the replay command. See the explanation of the replay command below.
recv "Request" mark { alternate xmit "A\r" recv "A-Connected" 30 alternate replay recv "A-Busy" 1 log "A was busy-trying B" xmit "B\r" recv "B-Connected" 30 alternate log "Both A and B were busy" abort }
Note that a small timeout value was given on the recv command which followed the replay command. A small value is adequate since the ``A-busy'' string, if received, will already be present in the input buffer.
\b - backspace (ASCII 8) \f - form feed (ASCII 12) \n - newline or line feed (ASCII 10) \r - carriage return (ASCII 13) \t - tab (ASCII 9) \ddd - ASCII value ddd (in octal)
If the recv command appears in a ``select block'', instead of causing the script to abort, a timeout causes control to be passed to the next ``alternate block'' (see the { ... } command above).
recvill "\0\1\2\3\4\5\6\7\10\11\12\13\14\15\16\17"
Any number of recvill commands can be given in a script file; the resulting illegal-character set will be the union of the codes given in each command. All recvill commands must come before the start command in the script file, so that the illegal character set has been completely specified before the protocol is started. The default illegal-character set is zeroed by the first recvill command to appear in the script. The default set is: the control characters (\0 through \37) and delete (\177).
40 <= size <= 255
\x - delay one second \# - send a break
40 <= size <= 255
Suppose you wanted to set up a script file to perform the following phone call and login dialog using a standalone autodialing modem, a Vadic 3451PA, configured on direct line "vadic1200":
^E <----- user types ^E to enter auto-dial mode HELLO: I'M READY <----- modem responds with message and prompt *D <----- user types dial command NUMBER? <----- modem prompts for phone number <----- user enters number and hits return 12225551000 <----- user types <cr> to verify echo of number DIALING: ON LINE <----- dials and reports when carrier is detected. Welcome to the 11/70 Name: szurko <----- user types login name Password: <----- user types password channel: elec70 <----- remote PhoneNet "slave" program prompts for MMDF channel name <----- PhoneNet protocol startup A script to perform this login sequence might be: window 2 1 xmitpack 130 recvpack 130 dial vadic1200 xmit "\5\x\x\r" recv "*" 20 xmit "D\x\r" recv "NUMBER?\r\n" 30 xmit "12225551000\x\r" recv "12225551000\r\n" 20 xmit "\r" recv "ON LINE\r\n" 60 xmit "\x\x\r" recv "Name:" 30 xmit "szurko\r" recv "Password:" 30 xmit "secret\r" recv "channel:" 45 xmit "elec70\r" recv "elec70" 15 start endAn example script for establishing this connection using a dialport (separate ACU and modem devices) would be:
window 2 1 xmitpack 130 recvpack 130 dial 1200|<wats>12225551000 xmit "\x\x\r" recv "Name:" 45 xmit "szurko\r" recv "Password:" 15 xmit "secret\r" recv "channel:" 45 xmit "elec70\r" recv "elec70" 15 start end